<?=view("home.header")?>
<?=view("home.nav")?>
<div class="content-wrapper">
    <div class="container">
        <div class="row pad-botm">
            <div class="col-md-12">
                <h4 class="header-line">电子币充值</h4>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        申请充值
                    </div>
                    <div class="panel-body">
                        <p>电子币余额:<?=$user->Mu_BuyFunds?></p>
                        <form class="form" method="post">
                            {{csrf_field()}}
                            <div class="form-group">
                                <label>充值金额</label>
                                <input class="form-control" name="Mam_AddMoney" type="number" min="1" required="required">
                                <p class="help-block">请输入1的整数倍</p>
                            </div>
                            <button class="btn btn-info">充值</button>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        转账记录
                    </div>
                    <div class="panel-body">
                        <table class="table table-striped table-bordered table-hover dataTable no-footer" id="dataTables-example" aria-describedby="dataTables-example_info">
                            <thead>
                                <tr role="row">
                                    <th class="sorting_asc" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column ascending" style="width: 189px;">会员编号</th>
                                    <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 150px;">充值金额</th>
                                    <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 150px;">充值前金额</th>
                                    <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 150px;">充值后金额</th>
                                    <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 150px;">充值时间</th>
                                    <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 150px;">备注</th>
                                    <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 150px;">充值类型</th>
                                    <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 150px;">审核状态</th>
                                    <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 150px;">审核时间</th>
                                </tr>
                            <tbody>
                                <?php 
                                    if ($utlogs && count($utlogs) > 0):
                                        foreach ($utlogs as $ml):
                                ?>
                                <tr class="gradeA odd">
                                    <td class="sorting_1"><?=$ml->Mag_Number?></td>
                                    <td class=" ">-<?=$ml->Mam_AddMoney?></td>
                                    <td class=" "><?=$ml->Mam_OldMoney?></td>
                                    <td class=" "><?=$ml->Mam_AllMoney?></td>
                                    <td class=" "><?=$ml->Mam_CreateTime?></td>
                                    <td class=" "><?=$ml->Mam_Memo?></td>
                                    <td class=" "><?=$ml->getType()?></td>
                                    <td class=" "><?=$ml->getApproved()?></td>
                                    <td class=" "><?=$ml->Mam_ApprovedTime?></td>
                                </tr>
                                <?php
                                        endforeach;
                                    endif;
                                ?>
                            </tbody>
                        </table>
                        <?=$utlogs->render()?>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?=view("home.footer")?>
